package com.example.liyuehui.pluginlib;

import org.gradle.api.Plugin;
import org.gradle.api.Project;

import java.io.File;

/**
 * Created by LiYueHui on 2017/11/19.
 */

public class PluginDemoPlugin implements Plugin<Project>{
    @Override
    public void apply(Project project) {
        WriteFooTask task =  project.getTasks().create("helloLiyuehui", WriteFooTask.class);
        task.setFileName("HelloWorld.txt");
        task.setFooData(new FooData("Jim",19));
        task.setTargetDir(new File("D:\\1"));
        task.setGroup("hello");
    }
}
